package com.code.refactoring.ut_study.spring;

import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

@RestController
@RequestMapping(("mock/demo"))
public class MockController {

    @Autowired
    private MockService mockService;

    @RequestMapping("fun")
    public void fun() {
        System.out.println("invoke controller fun..");
        String name = mockService.findById(1L);
        mockService.save(name, "111");
    }
}
